<!DOCTYPE html>
<html lang="UTF-8" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<div th:replace="~{include-head :: head}"></div>
<link rel="stylesheet" href="/css/pagination.css">
<link rel="stylesheet" type="text/css" href="/ztree/zTreeStyle.css">
<body >

<div id="vueBox">

    <div th:replace="~{include-nav :: nav}"></div>


    <div class="container-fluid" >
        <div class="row">

            <div th:replace="~{include-sidebar :: sidebar}"></div>

            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><i class="glyphicon glyphicon-th"></i> 数据列表</h3>
                    </div>
                    <div class="panel-body">
                        <form class="form-inline" role="form" style="float:left;">
                            <div class="form-group has-feedback">
                                <div class="input-group">
                                    <div class="input-group-addon">查询条件</div>
                                    <input class="form-control has-success" id="keywordInput"  type="text" v-model="keyword" v-text="keyword" placeholder="请输入查询条件">
                                </div>
                            </div>
                            <button type="button" @click="searchBtnClick" id="searchBtn" class="btn btn-warning"><i class="glyphicon glyphicon-search"></i> 查询</button>
                        </form>
                        <button type="button" @click="batchRemoveBtnClick" class="btn btn-danger" style="float:right;margin-left:10px;"><i class=" glyphicon glyphicon-remove"></i> 删除</button>
                        <button type="button" @click="addBtnClick" class="btn btn-primary" style="float:right;" ><i class="glyphicon glyphicon-plus"></i> 新增</button>
                        <br>
                        <hr style="clear:both;">
                        <div class="table-responsive">
                            <table class="table  table-bordered">
                                <thead>
                                <tr >
                                    <th width="30">#</th>
                                    <th width="30"><input id="summaryBox" type="checkbox"></th>
                                    <th>名称</th>
                                    <th width="100">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="item in MyData.list">
                                    <td>{{item.id}}</td>
                                    <td><input class="itemBox" :roleid="item.id" type="checkbox"></td>
                                    <td>{{item.name}}</td>
                                    <td>
                                        <button @click="checkBtn" type="button" class="btn btn-success btn-xs checkBtn"><i class=" glyphicon glyphicon-check"></i></button>
                                        <button @click="editBtnClick" :roleid="item.id" type="button" class="btn btn-primary btn-xs"><i class=" glyphicon glyphicon-pencil"></i></button>
                                        <button @click="removeBtnClick" :roleid="item.id" type="button" class="btn btn-danger btn-xs"><i class=" glyphicon glyphicon-remove"></i></button>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr >
                                    <td colspan="4" align="center">
                                        <div id="Pagination" class="pagination">
                                            <!-- 这里显示分页 -->
                                        </div>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>

    <div th:replace="~{include-modal-role-confirm :: roleconfirm}"></div>
    <div th:replace="~{include-modal-role-add :: roleadd}"></div>
    <div th:replace="~{include-modal-role-edit :: roleedit}"></div>

    <div th:replace="~{include-modal-assign-auth :: roleAssignAuthModal}"></div>

</div>
<script type="text/javascript" src="/jquery/jquery.pagination.js"></script>
<script type="text/javascript" src="/ztree/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="/script/my-role.js"></script>


</body>
</html>
